import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import './styles/base.css' // css样式预设文件
import './styles/theme.css' // 主题样式变量文件
import './styles/common.css' // 公共样式变量文件
import '@/api/index' // 引入axios实例
import i18n from '@/locale'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
process.env.VUE_APP_MOCK === 'true' && require('@/mock')

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(store).use(router).use(ElementPlus).use(i18n).mount('#app')
